<template>
    <div class="siMin">
        <!-- 头部骨架 -->
        <header class="siMin_header">
            <h1>居家</h1>
            <ul>
                <li v-for="item in header.children" :key="item.id">{{ item.name }}</li>
            </ul>
            <slot name="header"></slot>
        </header>
        <!-- 内容骨架 -->
        <section class="siMin_section">
            <aside class="siMin_section_left">
                <img :src="data.picture" alt="">
            </aside>
            <div class="siMin_section_right">
                <ul>
                    <li v-for="item in data.goods" :key="item.id">
                        <img :src="item.picture" alt="">
                        <p>{{ item.name }}</p>
                        <p>{{ item.desc }}</p>
                        <p>￥{{ item.price }}</p>
                        <div class="siMin_tian">
                            <p>找相似</p>
                            <p>发现更多宝贝></p>
                        </div>
                    </li>
                </ul>
            </div>
        </section>
    </div>
</template>
<script>
export default {
    props: ['data', 'header']
}
</script>
<style lang="scss">
.siMin {
    width: 1200px;
    height: 725px;
    margin: auto;
    overflow: hidden;

    .siMin_header {
        width: 100%;
        height: 115px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        &>ul {
            width: 28%;
            font-size: 14px;
            height: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-left: 550px;

            li {
                flex: 1;
                height: 20%;
            }

            li:hover {
                background: #27ba9b;
            }
        }
    }

    .siMin_section {
        width: 100%;
        height: 610px;
        display: flex;
        justify-content: space-between;
        // background: red;

        .siMin_section_left {
            width: 250px;
            height: 610px;
            // background: pink;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .siMin_section_right {
            width: 940px;
            height: 610px;
            // background: pink;

            ul {
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: space-between;
                flex-wrap: wrap;
                align-content: space-between;

                li {
                    width: 23%;
                    height: 47%;
                    // background: gold;
                    display: flex;
                    justify-content: center;
                    flex-wrap: wrap;
                    align-content: space-around;
                    border: 1px solid white;
                    position: relative;
                    overflow: hidden;
                    img {
                        width: 70%;
                        height: 50%;
                    }

                    p {
                        width: 70%;
                        font-size: 16px;
                    }

                    p:nth-child(3) {
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                    }
                    p:nth-child(4) {
                        font-size: 20px;
                        color: red;
                    }
                    .siMin_tian{
                        position: absolute;
                        bottom: 0;
                        left: 0;
                        width: 100%;
                        height: 30%;
                        background: #27ba9b;
                        display: flex;
                        justify-content: space-around;
                        align-items: center;
                        flex-wrap: wrap;
                      
                        color: white;
                        transform: translate(0,101%);
                        p{
                            text-align: center;
                            width: 60%;
                            height: 40%;
                            margin-top: 2%;
                        }
                        p:nth-child(1){
                            border-bottom: 1px solid white;
                        }
                    }
                }
                li:hover{ 
                    border: 1px solid green;
                }
                li:hover .siMin_tian{
                    transform: translate(0,0);
                }
            }
        }
    }
}
</style>